//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { MinishopFailedJob, MinishopFailedJobResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooMinishopFailedJobList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<MinishopFailedJobResponse>(`/uctoo/minishop_failed_job/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooMinishopFailedJob = async (id: string) => {
  return requestClient.get<MinishopFailedJob>(`/uctoo/minishop_failed_job/${id}`);
};

export const adductooMinishopFailedJob = async (data: Partial<MinishopFailedJob>) => {
  return requestClient.post<MinishopFailedJob>('/uctoo/minishop_failed_job/add', data);
};

export const edituctooMinishopFailedJob = async (data: Partial<MinishopFailedJob>) => {
  return requestClient.post<MinishopFailedJob>('/uctoo/minishop_failed_job/edit', data);
};

export const deleteuctooMinishopFailedJob = async (id: string) => {
  return requestClient.post<any>('/uctoo/minishop_failed_job/del', { id });
};
